blob: ad6d14c55aab2144bdac3c313305ba408fe5f0db [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-rev-list(1)
2===============
3
4NAME
5----
6git-rev-list - Lists commit objects in reverse chronological order
7
8
9SYNOPSIS
10--------
Junio C Hamano235a91e2006-01-07 01:13:5811[verse]
Junio C Hamano1a4e8412005-12-27 08:17:2312'git-rev-list' [ \--max-count=number ]
Junio C Hamano235a91e2006-01-07 01:13:5813 [ \--max-age=timestamp ]
14 [ \--min-age=timestamp ]
15 [ \--sparse ]
16 [ \--no-merges ]
Junio C Hamano9be18972006-01-28 08:54:5717 [ \--remove-empty ]
Junio C Hamano235a91e2006-01-07 01:13:5818 [ \--all ]
Junio C Hamanodecf50e2006-03-05 10:51:1419 [ \--topo-order ]
Junio C Hamano235a91e2006-01-07 01:13:5820 [ \--parents ]
Junio C Hamano5f327762006-03-02 09:14:5121 [ [\--objects | \--objects-edge] [ \--unpacked ] ]
Junio C Hamano235a91e2006-01-07 01:13:5822 [ \--pretty | \--header ]
23 [ \--bisect ]
24 <commit>... [ \-- <paths>... ]
Junio C Hamano1a4e8412005-12-27 08:17:2325
26DESCRIPTION
27-----------
28Lists commit objects in reverse chronological order starting at the
29given commit(s), taking ancestry relationship into account. This is
30useful to produce human-readable log output.
31
32Commits which are stated with a preceding '{caret}' cause listing to stop at
33that point. Their parents are implied. "git-rev-list foo bar {caret}baz" thus
34means "list all the commits which are included in 'foo' and 'bar', but
35not in 'baz'".
36
37A special notation <commit1>..<commit2> can be used as a
38short-hand for {caret}<commit1> <commit2>.
39
40
41OPTIONS
42-------
43--pretty::
44Print the contents of the commit changesets in human-readable form.
45
46--header::
47Print the contents of the commit in raw-format; each
48record is separated with a NUL character.
49
50--objects::
51Print the object IDs of any object referenced by the listed commits.
52'git-rev-list --objects foo ^bar' thus means "send me all object IDs
53which I need to download if I have the commit object 'bar', but
54not 'foo'".
55
Junio C Hamano5f327762006-03-02 09:14:5156--objects-edge::
57Similar to `--objects`, but also print the IDs of
58excluded commits refixed with a `-` character. This is
59used by `git-pack-objects` to build 'thin' pack, which
60records objects in deltified form based on objects
61contained in these excluded commits to reduce network
62traffic.
63
Junio C Hamano1a4e8412005-12-27 08:17:2364--unpacked::
65Only useful with `--objects`; print the object IDs that
66are not in packs.
67
68--bisect::
69Limit output to the one commit object which is roughly halfway
70between the included and excluded commits. Thus, if 'git-rev-list
Junio C Hamanob0ec2db2006-05-09 00:32:3271--bisect foo {caret}bar {caret}baz' outputs 'midpoint', the output
72of 'git-rev-list foo {caret}midpoint' and 'git-rev-list midpoint
73{caret}bar {caret}baz' would be of roughly the same length.
74Finding the change
Junio C Hamano1a4e8412005-12-27 08:17:2375which introduces a regression is thus reduced to a binary search:
76repeatedly generate and test new 'midpoint's until the commit chain
77is of length one.
78
79--max-count::
80Limit the number of commits output.
81
82--max-age=timestamp, --min-age=timestamp::
83Limit the commits output to specified time range.
84
85--sparse::
86When optional paths are given, the command outputs only
87the commits that changes at least one of them, and also
88ignores merges that do not touch the given paths. This
89flag makes the command output all eligible commits
90(still subject to count and age limitation), but apply
91merge simplification nevertheless.
92
Junio C Hamano9be18972006-01-28 08:54:5793--remove-empty::
94Stop when a given path disappears from the tree.
95
Junio C Hamano1a4e8412005-12-27 08:17:2396--all::
97Pretend as if all the refs in `$GIT_DIR/refs/` are
98listed on the command line as <commit>.
99
100--topo-order::
101By default, the commits are shown in reverse
102chronological order. This option makes them appear in
103topological order (i.e. descendant commits are shown
104before their parents).
105
Junio C Hamano1a4e8412005-12-27 08:17:23106Author
107------
108Written by Linus Torvalds <torvalds@osdl.org>
109
Junio C Hamano1a4e8412005-12-27 08:17:23110Documentation
111--------------
112Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
113
114GIT
115---
116Part of the gitlink:git[7] suite
117